# coding=utf-8
import os
import sys
sys.path.append('D:\\test\\Appium2021')
# print(os.system('adb devices'))


class DosCmd:
    def excute_cmd_result(self, command):
        result_list = []
        result = os.popen(command).readlines()
        for i in result:
            if i == '\n':
                continue
            result_list.append(i.strip('\n'))
        return result_list

    def excute_cmd(self, command):
        os.system(command)



if __name__ == '__main__':
    dos = DosCmd()
    # print(dos.excute_cmd_result('adb devices'))
    print(dos.excute_cmd('adb devices'))